package com.bx.controller;

import com.bx.service.SchoolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Name SchoolController
 * @Author BaiXin
 * @Date 2022-10-22 19:57
 */
@RestController
@RequestMapping("/schools")
public class SchoolController {

    @Autowired
    private SchoolService schoolService;

    @RequestMapping("/{id}")
    public String deteleById(@PathVariable Integer id){
        schoolService.deleteById(id);
        System.out.println(id);
        return "删除成功";
    }
}
